<?php $this->_extends('../_layouts/blank_layout'); ?>
<?php $this->_block('contents'); ?>
<script type="text/javascript" src="<?=Q::ini('custom_system/base_url')?>js/validator.js"></script>
<h3>模块信息</h3>
<form method="post" action="<?=url('Online::EbayTemplate/BasePartModuleCreateSave')?>" onsubmit="return Validator.Validate(this,3);">
<table class="form_table">
<tr>
	<th>模块名称</th>
	<td><input type="text" name="name" dataType="Require" msg=" 名称不能为空" /></td>
</tr>
<tr>
	<th>所属基板块</th>
	<td>
		<select name="base_part_id" dataType="Require" msg=" 请选择所属基板块">
		<?foreach ($base_part as $bp):?>
		<option value="<?=$bp['id']?>" <?if (isset($_GET['id']) && $_GET['id'] == $bp['id'])echo "selected='selected'"?>><?=$bp['name']?></option>
		<?endforeach;?>
		</select>
	</td>
</tr>
<tr>
	<th>模块变量</th>
	<td><input type="text" name="variable_name" dataType="Require" msg=" 变量不能为空"/><span class="red"> * 内置变量名template/base/entries不可用</span></td>
</tr>
<tr>
	<th>排序</th>
	<td><input type="text" name="sort" /></td>
</tr>
<tr>
	<th>类型</th>
	<td>
		<select name="type" dataType="Require" msg=" 请选择类型">
			<?foreach (Q::ini('custom_flag/ebay_template_base_part_module_type') as $type):?>
			<option value="<?=$type['value']?>"><?=$type['name']?></option>
			<?endforeach;?>
		</select>
	</td>
</tr>
<tr>
	<th><input type="hidden" name="parent_action_id" value="<?=$_GET['parent_action_id']?>" /></th>
	<td><input type="submit" class="button" value="提交" /><input type="hidden" name="<?=Q::ini('unique_token_name');?>" value="<?=Helper_BSS_Normal::genToken();?>"/></td>
</tr>
</table>
</form>
<a href="<?=url('Online::EbayTemplate/BaseDetail', array('id' => $_GET['parent_action_id']))?>">返回上一级</a>
<?php $this->_endblock();?>